package com.event.management.backend.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 问卷反馈概览数据传输对象
 */
@Data
@ApiModel(value = "问卷反馈概览", description = "活动问卷反馈统计数据")
public class FeedbackReportDTO {
    
    @ApiModelProperty(value = "活动ID")
    private Long eventId;
    
    @ApiModelProperty(value = "活动标题")
    private String eventTitle;
    
    @ApiModelProperty(value = "问卷总提交数")
    private Integer totalSubmissions;
    
    @ApiModelProperty(value = "参与率（提交数/参与者总数）")
    private BigDecimal participationRate;
    
    @ApiModelProperty(value = "总体满意度（百分比）")
    private BigDecimal satisfactionRate;
    
    @ApiModelProperty(value = "问题统计数据")
    private List<QuestionStat> questionStats;
    
    @ApiModelProperty(value = "热门评价词")
    private List<KeywordFrequency> keywords;
    
    /**
     * 问题统计数据
     */
    @Data
    public static class QuestionStat {
        @ApiModelProperty(value = "题目ID")
        private Long questionId;
        
        @ApiModelProperty(value = "题目内容")
        private String questionText;
        
        @ApiModelProperty(value = "题目类型")
        private String questionType;
        
        @ApiModelProperty(value = "选项统计（单选和多选题）")
        private Map<String, Integer> optionCounts;
        
        @ApiModelProperty(value = "平均得分（如果适用）")
        private BigDecimal averageScore;
    }
    
    /**
     * 关键词频率
     */
    @Data
    public static class KeywordFrequency {
        @ApiModelProperty(value = "关键词")
        private String keyword;
        
        @ApiModelProperty(value = "出现频率")
        private Integer frequency;
    }
} 